package xyz.mumu233.robot.enums;

import lombok.Getter;

/**
 * @Author mumu
 * @create 2019/4/27 12:11
 */
@Getter
public enum MasterStatusEnum {
    SLEEP(1,"睡觉"),
    WORK(2,"工作"),
    ONLINE(3,"在线"),
    GAMING(4,"玩游戏"),
    ZIBI(5,"自闭中");

    private int code;
    private String content;

    MasterStatusEnum(int code, String content) {
        this.code = code;
        this.content = content;
    }

    public static MasterStatusEnum getStatusByCode(int code){
        for (MasterStatusEnum statusEnum : MasterStatusEnum.values()){
            if(statusEnum.getCode() == code){
                return statusEnum;
            }
        }
        return null;
    }
}
